import Vue from "vue";
import ElementUI from "element-ui";
import router from "./router";
// 自定义配色方案
import "./assets/theme/index.css";
import App from "./App.vue";

// 配置 axios
import axios from "axios";
import VueAxios from "vue-axios";

// 设置使用axios的统一配置
import http from "@/api/config";

// 引用store
import store from "./store";

// 使用 cookies
import VueCookies from "vue-cookies";

Vue.config.productionTip = false;

Vue.use(ElementUI);
Vue.use(VueCookies);
Vue.prototype.$http = http;
Vue.use(VueAxios, axios);
axios.defaults.baseURL = "api"; // 开发的时候自动在接口路径前面添加"api/"，解决接口跨域问题

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
